package com.huohuo.springdemo.config;

import com.huohuo.springdemo.ioc.ProductFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MainConfig {

    /**
     * 看上去装配一个ProductFactoryBean类型的bean，实际上工厂bean是通过调用getObject方法创建的对象
     * @return
     */
    @Bean
    public ProductFactoryBean productFactoryBean(){

        return new ProductFactoryBean();
    }
}
